package com.copa.l191;

/**
 * @author copa
 * @createDate 2022-08-26 10:12
 * @function api调用
 */
public class Test1 {

    public int hammingWeight(int n) {
        return Integer.bitCount(n);
    }

    public static void main(String[] args) {
        int n = 00000000000000000000000000001011;
        System.out.println(new Test1().hammingWeight(n));
    }
}
